Documentation Index
Fetch the complete documentation index at: https://mintlify.com/LizandroCanul/back_sdo/llms.txt
Use this file to discover all available pages before exploring further.
Deletes a public work (obra) and all its associated locations.
Authentication & Authorization
This endpoint requires admin role. Regular users cannot delete obras.
Bearer token for authentication with admin roleAuthorization: Bearer YOUR_JWT_TOKEN
Path Parameters
The unique identifier of the obra to delete
Response
Returns no content on successful deletion (HTTP 200).
This operation cascades to delete all associated ubicaciones (locations) for the obra.
Example Request
curl -X DELETE "https://api.yucatan.gob.mx/obras/1" \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
Example Response
The response body is empty on successful deletion.
Error Responses
401 Unauthorized
{
"statusCode": 401,
"message": "Unauthorized"
}
Returned when the JWT token is missing, invalid, or expired.
403 Forbidden
{
"statusCode": 403,
"message": "Forbidden resource",
"error": "Forbidden"
}
Returned when the authenticated user does not have admin role.
404 Not Found
{
"statusCode": 404,
"message": "Obra 999 no encontrada.",
"error": "Not Found"
}
Returned when the obra with the specified ID does not exist.
This operation is irreversible. All data associated with the obra, including locations, will be permanently deleted.